# the minimum version of CMake.
cmake_minimum_required(VERSION 3.5.0)
project(image_cache_demo)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)

find_library(
hilog-lib
hilog_ndk.z
)

find_library(
ace-ndk
ace_ndk.z
)

find_library(
ace-napi
ace_napi.z
)

find_library(
rcp-lib
rcp_c
)

add_library(imageCache SHARED
ImageCache/napi_init.cpp
ImageCache/ImageFileCache.cpp
ImageCache/LRUCache.cpp
ImageCache/ImageUtil.cpp)
target_link_libraries(imageCache PUBLIC libace_napi.z.so ${hilog-lib} ${ace-ndk} ${ace-napi} ${rcp-lib})